{extend name='common@layout/seller' /}
{block name="left"}{include file='store/left'}{/block}
{block name="breadcrumb"}
<div class="ncsc-path"><i class="icon-desktop"></i>商家管理中心<i class="icon-angle-right"></i>店铺<i class="icon-angle-right"></i>幻灯片设置</div>
{/block}
{block name='content'}
{include file='store/tab'}
<div class="ncsc-form-default"> 
    <div class="alert">
        <ul>
            <li>1. 最多可上传5张幻灯片图片。</li>
            <li>2. 支持jpg、jpeg、gif、png格式上传，建议图片请选择最小不低于W(宽度):1280px H(高度):300px、最大不超过W:1920px H:440px,大小1.00M以内的清晰图片作为幻灯片图片。提交2~5张图片可以进行幻灯片播放，一张图片没有幻灯片播放效果。</li>
            <li>3. 操作完成以后，按“提交”按钮，可以在当前页面进行幻灯片展示。</li>
            <li>4. 跳转链接必须带有<b style="color:red;">“http://”</b></li>
        </ul>
    </div>
    <div class="flexslider">
        <ul class="slides">
        {if(!empty($slide) && is_array($slide))}
        {for start="0" end="5"}
        {if($slide[$i] != '')}
      <li><a {if($slide_url[$i]!='' and $slide_url[$i] != "http//")}href="{$slide_url[$i]}"{/if} ><img alt="商家大图" src="/uploads/{$slide[$i]}"></a></li>
      {/if}
      {/for}
      {else /}
      {foreach($default_slide as $key => $val)}
            <li><img alt="{$val.name}" src="{$val.image|img_url}"></li>
            {/foreach}
            {/if}
        </ul>
    </div>
    <form action="index.php?s=seller/store/slide" id="store_slide_form" method="post" onsubmit="ajaxpost('store_slide_form', '', '', 'onerror');return false;">
        <input type="hidden" name="form_submit" value="ok" />
        <ul class="ncsc-store-slider" id="goods_images">
        
        {for start="0" end="5"}
      <li nc_type="handle_pic" id="thumbnail_{$i}">
        <div class="picture" nctype="file_{$i}">
          {if(empty($slide[$i]))}
          <i class="icon-picture"></i>
          {else /}
          <img alt="商家大图" nctype="file_{$i}" src="/uploads/{$slide[$i]}" />
          {/if}
          <input type="hidden" name="image_path[]" nctype="file_{$i}" value="{$slide[$i]??''}" /><a href="javascript:void(0)" nctype="del" class="del" title="移除">X</a></div>
        
        <div class="url">
          <label>跳转URL...</label>
          <input type="text" class="text w150" name="image_url[]" value="{if(!isset($slide_url[$i]) || $slide_url[$i] == '' )}http://{else /}{$slide_url[$i]}{/if}" />
        </div>
         <div class="ncsc-upload-btn"> <a href="javascript:void(0);"><span>
          <input type="file" hidefocus="true" size="1" class="input-file" name="file[]" id="file_{$i}"/>
          </span>
          <p><i class="icon-upload-alt"></i>图片上传</p>
          </a></div></li>
      {/for}
        </ul>
        <div class="bottom"><label class="submit-border"><input type="submit" class="submit" value="提交"></label></div>
    </form>
</div>
<script src="/old/data/resource/js/ajaxfileupload/ajaxfileupload.js?v1.2" charset="utf-8"></script> 
<script src="/old/shop/resource/js/store_slide.js?v1.2" charset="utf-8"></script>
<script type="text/javascript" src="/old/data/resource/js/jquery.flexslider-min.js?v1.2"></script> 
<script type="text/javascript">
        var SITEURL = "{$Think.config.url_base}";
        var SHOP_TEMPLATES_URL = SITEURL + 'old/shop/templates/new20160622';
        var UPLOAD_SITE_URL = SITEURL + 'uploads/';
        var ATTACH_COMMON = 'shop/common';
        var ATTACH_STORE = 'shop/store';
        var SHOP_RESOURCE_SITE_URL = SITEURL + 'old/shop/resource';
</script>
{/block}